package com.ht.base.system.client;

import com.ht.base.system.common.pojo.bo.SysUserBO;
import com.ht.base.system.common.pojo.qto.SysUserQTO;
import org.base.common.appexception.AppException;
import org.base.common.appexception.ResultData;
import org.base.common.page.PageBO;

/**
 * @Author hdengxian
 * @Date 2023/8/11 8:49
 */

public interface SysUserClient {
    /**
     * 新增用户
     * @param userBO
     * @return
     * @throws AppException
     */
    ResultData<SysUserBO> insertUser(SysUserBO userBO) throws AppException;

    /**
     * 修改用户
     * @param userBO
     * @return
     * @throws AppException
     */
    ResultData<Boolean> updateUser(SysUserBO userBO) throws AppException;

    /**
     * 删除用户
     * @param sysUserId
     * @return
     * @throws AppException
     */
    ResultData<Boolean> deleteUser(Long sysUserId) throws AppException;

    /**
     * 通过用户ID查询用户信息
     * @param sysUserId
     * @return
     * @throws AppException
     */
    ResultData<SysUserBO> findByUserId(Long sysUserId) throws AppException;

    /**
     * 通过登录账号查询用户信息
     * @param loginNo
     * @return
     */
    ResultData<SysUserBO> findUserByLoginNo(String loginNo);

    /**
     * 分页查询用户列表数据
     * @param qto
     * @return
     * @throws AppException
     */
    ResultData<PageBO<SysUserBO>> findUserForPage(SysUserQTO qto) throws AppException;


}
